#ifndef TOOLMANAGER_H
#define TOOLMANAGER_H

class ToolBase;
class ToolFactory;

class QUINCE_GUI_EXPORT ToolManager
{
public:
    virtual ~ToolManager();

    static ToolManager *instance() { return self; }

    virtual ToolBase * activeTool();
    virtual void addTool(ToolBase * tool);
    virtual void selectTool(ToolBase * tool);
    virtual void unselectTool(ToolBase * tool);
    virtual void removeTool(ToolBase * tool);

    void loadTools(ToolFactory *factory);

 protected:
    ToolManager(ToolManager *myself);

private:
    Q_DISABLE_COPY(ToolManager)
    static ToolManager * self;


    typedef list<ToolBase *> ToolList;
    ToolList m_tools;
};

#endif // TOOLMANAGER_H
